Tags: #◇Computer Science #◇STT101A #◇Conceptual #◇Bayes's Formula #◇Probability #◇Statistics
◇Overview
Bayes' Formula (Bayes' Theorem) provides the mathematical mechanism for updating conditional probabilities in light of new observed evidence. It connects the prior probability of an underlying cause with the posterior probability after an observable consequence occurs, formalizing rational Bayesian inference across machine learning, cybersecurity threat detection, and statistical modeling.
◇Key Definitions
- Prior Probability (): The initial probability of hypothesis or state before observing new evidence.
- Likelihood (): The conditional probability that evidence is observed, assuming hypothesis is true.
- Marginal Probability / Evidence (): The total probability of observing evidence across all mutually exclusive scenarios in the sample space.
- Posterior Probability (): The updated probability of hypothesis given that evidence has actually occurred.
- Partition of Sample Space: A collection of mutually exclusive and collectively exhaustive events such that for , and .
◇Theoretical Framework: Derivation & Mathematical Formulation
The Law of Total Probability
For any event and a partition of sample space :
Bayes' Theorem
By the definition of conditional probability:
Substituting the multiplication rule into the numerator and the Law of Total Probability into the denominator yields:
Probability Tree Model
◇Stepped Numerical Walkthrough: The Base Rate Fallacy in Threat Detection
Scenario: An enterprise Intrusion Detection System (IDS) monitors encrypted network flows for a rare zero-day rootkit.
- Base Rate (Prior Prevalence): Only of network flows contain the rootkit: , so benign traffic is .
- True Positive Rate (Sensitivity): If traffic contains the rootkit, the IDS raises an alert with probability: .
- False Positive Rate: If traffic is benign, the IDS falsely triggers with probability: .
Objective: If an incoming packet flow triggers an IDS alarm (), calculate the posterior probability that the packet actually carries the malicious rootkit ().
Step 1: Compute Total Probability of an Alarm ()
Using the Law of Total Probability:
Substitute the known values:
Observation: Notice that false alarms () outnumber true alarms () by a factor of 4!
Step 2: Apply Bayes' Formula
Step 3: Analytical Insight
Despite an impressive detection sensitivity and a low false positive rate, an alarm only indicates a chance of an actual breach.
This counterintuitive result is known as the Base Rate Fallacy: because benign traffic is overwhelmingly more common () than malicious traffic (), the sheer volume of benign opportunities generates four times more false positives than true positives.
◇References & Navigation
- Previous Topic: ◇Hypothesis Testing
- Next Topic: ◇Random Variable
- Related Notes: ◇Total Probability Rule, ◇Conditional Probability and Multiplicative Rules
ACTIVE RECALL VERIFICATION
Select an answer to verify conceptual comprehension and reveal the technical rationale.
In Bayes' Theorem, what does the term represent?
What role does the Law of Total Probability play in Bayes' Formula?
Why does the Base Rate Fallacy occur in medical screening or intrusion detection?
If events form a partition of sample space , which condition must strictly hold?
In our IDS example, what was the probability that a randomly chosen flow triggered an alarm ()?
If the prior probability of hypothesis is , likelihood , and total evidence probability , what is the posterior ?
What happens to the posterior probability if the prior probability while likelihood and evidence remain non-zero?
In Bayesian statistics, how is sequential updating performed when a second independent piece of evidence arrives?
What does a likelihood ratio of indicate?
Which branch of artificial intelligence directly implements Bayes' Formula with conditional independence assumptions between features?